08. Hash Maps Notebook
Workspace
This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity, so you may be able to download them there.
Workspace Information:
- Default file path:
- Workspace type: jupyter
- Opened files (when workspace is loaded): n/a
Note: Theoretically, the worst case time complexity of put
and get
operations of a HashMap can be O(n)
. However, our hashing functions are sophisticated enough that in real-life we easily avoid collisions and never hit O(n)
. Rather, for the most part, we can safely assume that the time complexity of put
and get
operations will be O(1)
.
Therefore, when you are asked to solve any practice problem involving HashMaps, assume the worst case time complexity for put
and get
operations to be O(1)
.